package com.dahua.messageconsumer;

import com.dahua.common.domain.Configs;
import com.dahua.common.config.PublicVars;
import com.dahua.common.service.ConfigsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ApplicationStartup implements CommandLineRunner {

    //    @Autowired
    //    ConfigsService configsService;

    @Override
    public void run(String... args) {
        // 统一在Schedule中
        //        List<Configs> configs = configsService.getConfigs();
        //        if (configs!=null && configs.size()>0) {
        //            PublicVars.hasApplicationInit=PublicVars.initParmsFromDB(configs);
        //        }
        //        System.out.println(configs);
    }
}
